/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.student.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 学生表Entity
 * 已修正尾注释
 * @author 梁师豪LXH
 * @version 2021-07-17
 */
@Table(name="test_student", alias="a", label="学生表信息", columns={
		@Column(name="student_id", attrName="studentId", label="学生id", isPK=true),
		@Column(name="student_name", attrName="studentName", label="学生姓名", queryType=QueryType.LIKE),
		@Column(name="student_sex", attrName="studentSex", label="学生性别"),
		@Column(name="student_number", attrName="studentNumber", label="手机号码"),
	}, orderBy="a.student_id DESC"
)
public class Student extends DataEntity<Student> {
	// 已修正尾注释
	private static final long serialVersionUID = 1L;
	// 学生id
	private String studentId;
	// 学生姓名
	private String studentName;
	// 学生性别
	private String studentSex;
	// 手机号码
	private String studentNumber;
	
	public Student() {
		this(null);
	}

	public Student(String id){
		super(id);
	}
	
	public String getStudentId() {
		return studentId;
	}

	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}
	
	@Length(min=0, max=20, message="学生姓名长度不能超过 20 个字符")
	public String getStudentName() {
		return studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}
	
	@Length(min=0, max=2, message="学生性别长度不能超过 2 个字符")
	public String getStudentSex() {
		return studentSex;
	}

	public void setStudentSex(String studentSex) {
		this.studentSex = studentSex;
	}
	
	@Length(min=0, max=16, message="手机号码长度不能超过 16 个字符")
	public String getStudentNumber() {
		return studentNumber;
	}

	public void setStudentNumber(String studentNumber) {
		this.studentNumber = studentNumber;
	}
	
}